<?php

session_start();

require_once "verifyimg.php";
$verifyimg = new Verifyimg();
$codeKey = "code";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	

</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<?php
// Skapar captchan med storleken 300 x 100
echo "<img src='cap1.php' alt='captcha'/>";

echo $verifyimg->DoForm();

	if (isset($_POST[$codeKey])) {
		$code = $_POST[$codeKey];

		if ($verifyimg->checkCode($code)){
			echo 'Bra jobbat den jobbiga koden stämmer';
		} 
		else 
		{
			echo 'Fel kod du får testa den tråkiga captchan igen';
		}
	}
?>  
</body>
</html>
